package com.ecc.common.controller;

import org.springframework.stereotype.Controller;


import com.ecc.auth.pojo.SysUserDO;
import com.ecc.common.utils.ShiroUtils;

@Controller
public class BaseController {
	
	public SysUserDO getUser() {
		return ShiroUtils.getUser();
	}

	public Long getUserId() {
		if(getUser()==null) 
		{
			return null;
		}
		return getUser().getUserId();
	}

	public String getUsername() {
		return getUser().getUsername();
	}
	
	
	
}